<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="zh-cn">
    <head>
        <!-- Bootstrap -->
        <include file="Include/css" />
        <title>油价同步日志</title>
        <link href="__STATICS__/css/admin/index.css" rel="stylesheet">
        <link href="__STATICS__/css/sweet-alert.css" rel="stylesheet">
        <script type="text/javascript" src="__STATICS__/js/sweet-alert.min.js"></script>
    </head>

    <body>
        <include file="Include/nav_top" />
        <div class="container clearfix" id="left_menu_wraper" >
            <include  file="Include/menu_left" />
            <div id="right-content">
                <div id="right-content-inner">
                    <ul class="breadcrumb">
                        <span>您的位置：</span>
                        <li><a href="{:U('Houtai/Index/index')}">首页</a> </li>
                        <li class="">油价同步</li>
                        <li class="active">油价同步日志</li>
                    </ul>
                    <p>
                        <button id="sysOil" class="btn btn-orange" type="button" >
                            同步油价
                        </button>
                    </p>
                    <div role="tabpanel">
                        <div class="row clearfix margin10 form-horizontal">
                            
                        </div>
                                <table class="table ">
                                    <thead class="table_head">
                                        <tr class="border">
                                            <th>编号</th>
                                            <th>已更新</th>
                                            <th>已新增</th>
                                            <th>更新失败</th>
                                            <th>新增失败</th>
                                            <th>错误信息</th>
                                            <th>状态</th>
                                            <th>添加时间</th>
                                            <th>完成时间</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <volist name="list" id="vo">
                                            <tr class="qr_tar" >
                                                <td  >
                                                    {$i+$num}
                                                </td>
                                                <td >
                                                {$vo.update}
                                                </td>
                                                <td >
                                                {$vo.insert}
                                                </td>
                                                <td >
                                                {$vo.updateError}
                                                </td>
                                                <td >
                                                {$vo.insertError}
                                                </td>
                                                <td >
                                                {$vo.errorInfo | default = '空'}
                                                </td>
                                                <td>
                                                    <switch name="vo['status']" >
                                                        <case value="0"><span class="text-blue">未完成</span></case>
                                                        <case value="1"><span class="text-success ">已完成</span></case>
                                                        <case value="2"><span class="text-warning ">执行失败</span></case>
                                                    </switch>
                                                </td>
                                                <td>{$vo['addTime'] | date="Y/m/d H:i:s",###} </td>
                                                <td>
                                                	<empty name='vo.finishTime'>
                                                		0
                                                	<else />
                                                		{$vo['finishTime'] | date="Y/m/d H:i:s",###}
                                                	</empty>
                                                </td>
                                                
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>

                                <div class="clearfix s_page pull-right">
                                    {$page}
                                </div>
                            </div>

                    </div>

                </div>

            </div>
                
        <include file="Include/script" />
        <script src="__STATICS__/js/bootstrap-editable.min.js"></script>
		<script>
			$(function () {
	            $('.system').addClass('open');
	            $('#system5').addClass('active');
	     	})
     	</script>
		
       <script>
                $("#sysOil").on("click", function () {
                	var isSure=confirm('同步油价请在新窗口等待同步完成再行关闭新窗口，是否现在开始同步？');
                	
                	if(isSure==true){
                		/*$.ajax({
                    		url: "{:U('Task/Index/sysOilPrice')}", 
                    		context: document.body, 
                    		success: function(){
                            	alert('任务提交成功！');
                         	},
                         	timeout:10,
                         	error:function(){
                         		alert('任务提交成功！注意，请勿重复提交！');
                         	}
                         	
                    	});*/
                        window.open("{:U('Task/Index/sysOilPrice')}");
                	}
                	
                 });
                                

           
                        
        </script>
    </body>
</html>